package vip.web3.admin.common.export;

import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

public class UserStatusConverter implements ExConverter<Integer> {

    @Override
    public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        if (value == 0) {
            return new CellData<>("禁用");
        } else if (value == 1) {
            return new CellData<>("正常");
        } else {
            return new CellData<>("未知");
        }
    }
}
